//.pragma library

Qt.include("Database.js")

//ウインドウ
var SETTING_KEY_MAIN_WINDOW_WIDTH = "MAIN_WINDOW_WIDTH";
var SETTING_KEY_MAIN_WINDOW_HEIGHT = "MAIN_WINDOW_HEIGHT";

// 一般設定
var SETTING_KEY_GENERAL_UPDATE_INTERVAL = "GENERAL_UPDATE_INTERVAL";
var SETTING_KEY_GENERAL_INREPLYTO_COUNT_MAX = "GENERAL_INREPLYTO_COUNT_MAX";
var SETTING_KEY_GENERAL_TO_FOCUS_TWEET_BUTTON = "GENERAL_TO_FOCUS_TWEET_BUTTON"
var SETTING_KEY_GENERAL_UPDATE_COUNT = "GENERAL_UPDATE_COUNT";
var SETTING_KEY_GENERAL_VIEW_COUNT = "GENERAL_VIEW_COUNT";
// 表示アイテム
var SETTING_KEY_VIEWITEM_TITLE = "VIEWITEM_TITLE";
var SETTING_KEY_VIEWITEM_MESSAGE = "VIEWITEM_MESSAGE";
var SETTING_KEY_VIEWITEM_INFORMATION = "VIEWITEM_INFORMATION";
var SETTING_KEY_VIEWITEM_INPUTBOX = "VIEWITEM_INPUTBOX";
var SETTING_KEY_VIEWITEM_ICONSIZE = "VIEWITEM_ICONSIZE";



// 値を取得する(bool)
function getValueBool(key){
    var value = readData(key);
    value = (value === "true") ? true : false;
    return value;
}

// 値を取得する(int)
function getValueInt(key, default_value){
    var value = readData(key);
    value = (value === undefined) ? default_value : value;
    return parseInt(value);
}
// 値を保存する
function setValue(key, value){
    saveData(key, value);
}
